package com.pyue.eam.job;

import java.time.LocalDate;

/**
 * @author jiangxiaojiang
 */
public class ExecuteDateHolder {

    private static final ThreadLocal<LocalDate> EXECUTE_DATE = new ThreadLocal<>();

    public static LocalDate getData() {
        return EXECUTE_DATE.get() == null ? LocalDate.now() : EXECUTE_DATE.get();
    }

    public static void setData(LocalDate partCost) {
        EXECUTE_DATE.set(partCost);
    }

    public static void remove() {
        EXECUTE_DATE.remove();
    }
}
